<template>
	<div class="drug">
		<Bluetable :tHead="tHead" :tData="tableData" @linkFun="blueFun"></Bluetable>
	</div>
</template>

<script>
	export default {
		data () {
			return {
				id:"",
				tHead:[
					{
						prop:"Pi_Title",
						label:"药品名称",
						link:true
					},
					{
						prop:"DisTrade_Name",
						label:"	商品名"
					},
					{
						prop:"Form",
						label:"剂型"
					},
					{
						prop:"Strength",
						label:"规格"
					},
					{
						prop:"Comp_Name",
						label:"	厂家"
					}
				],
				tableData: []
			}
		},
		mounted () {
			this.id=this.$route.query.id;
			this.getList()
		},
		methods:{
			async getList () {
				let res=await this.$kb.DrugPharmDic({Drug_Nameid:this.id});
				if(res.code == 200){
					this.tableData=res.data;
				}
			},
			blueFun (row) {
				let routes = this.$router.resolve({ name: "druginfo", query: { id: row.Piid,type:"drug"} });
				window.open(routes.href, "_blank");
			}
		}
	}
</script>

<style lang="scss" scoped>
	.drug{
		padding:10px;
	}
</style>
